package com.competitions.videoedithelper.service;

import com.alibaba.fastjson.JSONObject;
import com.competitions.videoedithelper.entity.ResponseModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Mapler
 */
public interface UserInfoService {
    /**
     * 登录
     * @param data 登录请求的数据
     * @param request http请求
     * @return 返回ResponseModel
     */
    ResponseModel login(JSONObject data,HttpServletRequest request
    );

    /**
     * 注册账号
     * @param data 注册请求的数据
     * @return 返回ResponseModel
     */
    ResponseModel registerAccount(JSONObject data);

    /**
     * 更新用户信息
     * @param data 用户信息
     * @return 返回ResponseModel
     */
    ResponseModel updateUserInfo(JSONObject data);

    /**
     * 获取注册用户列表
     * @return 返回ResponseModel
     */
    ResponseModel registerUserList();


    /**
     * 通过注册申请
     * @param userId 用户id
     * @return 返回ResponseModel
     */
    ResponseModel receiveRegister(int userId);

    /**
     * 驳回注册申请
     * @param userId 用户id
     * @return 返回ResponseModel
     */
    ResponseModel rejectRegister(int userId);

    /**
     * 获取用户列表
     * @return 返回ResponseModel
     */
    ResponseModel selectUsers();

    /**
     * 设置用户账号状态
     * @param userId 用户id
     * @param status 状态
     * @return 返回ResponseModel
     */
    ResponseModel setUserStatus(@Param("userId")int userId,@Param("status")int status);
}
